#!/bin/bash
echo "=== 构建 DevOps 平台 ==="

cd /d/vc/devops-platform

if [ ! -d "build" ]; then
    mkdir build
fi

cd build

echo "1. 运行 CMake..."
cmake ..

echo "2. 编译项目..."
make -j4

if [ $? -eq 0 ]; then
    echo "✅ 构建成功！可执行文件: ./devops-platform"
    echo "📁 构建目录: /d/vc/devops-platform/build/"
else
    echo "❌ 构建失败！"
    exit 1
fi
